<h1>Add an object</h1>

<%= error_messages_for :entity %>

<% form_for(:entity, :url => museum_objects_path) do |f| %>

<p>Name: <%= text_field :entity, :name %></p>

<p>Accession no.: <%= text_field :entity, :museum_identifier %></p>

<p>Country of origin: <%= collection_select(:entity, :country_id, @countries, :id, :name, {:include_blank => true} )%></p>

<p>Acquisition method: <%=  f.collection_select :acquisition_method_id, @acquisition_methods, :id, :name, {:include_blank => true} %></p>

<p>Year of acquisition <%= text_field :entity, :acquired_year %></p>

  <p>
    <%= submit_tag "Create" %>
  </p>
<% end %>

<%= link_to 'Back', museum_objects_path %>